/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "sctstbparticip")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sctstbparticip.findAll", query = "SELECT s FROM Sctstbparticip s"),
    @NamedQuery(name = "Sctstbparticip.findBySctstbparticipid", query = "SELECT s FROM Sctstbparticip s WHERE s.sctstbparticipid = :sctstbparticipid")})
public class Sctstbparticip implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sctstbparticipid")
    private Integer sctstbparticipid;
    @JoinColumn(name = "sctstbtipoparid", referencedColumnName = "sctstbtipoparid")
    @ManyToOne(optional = false)
    private Sctstbtipopar sctstbtipoparid;
    @JoinColumn(name = "sctstbtesisid", referencedColumnName = "sctstbtesisid")
    @ManyToOne(optional = false)
    private Sctstbtesis sctstbtesisid;
    @JoinColumn(name = "scthtbdatosgenid", referencedColumnName = "scthtbdatosgenid")
    @ManyToOne(optional = false)
    private Scthtbdatosgen scthtbdatosgenid;

    public Sctstbparticip() {
    }

    public Sctstbparticip(Integer sctstbparticipid) {
        this.sctstbparticipid = sctstbparticipid;
    }

    public Integer getSctstbparticipid() {
        return sctstbparticipid;
    }

    public void setSctstbparticipid(Integer sctstbparticipid) {
        this.sctstbparticipid = sctstbparticipid;
    }

    public Sctstbtipopar getSctstbtipoparid() {
        return sctstbtipoparid;
    }

    public void setSctstbtipoparid(Sctstbtipopar sctstbtipoparid) {
        this.sctstbtipoparid = sctstbtipoparid;
    }

    public Sctstbtesis getSctstbtesisid() {
        return sctstbtesisid;
    }

    public void setSctstbtesisid(Sctstbtesis sctstbtesisid) {
        this.sctstbtesisid = sctstbtesisid;
    }

    public Scthtbdatosgen getScthtbdatosgenid() {
        return scthtbdatosgenid;
    }

    public void setScthtbdatosgenid(Scthtbdatosgen scthtbdatosgenid) {
        this.scthtbdatosgenid = scthtbdatosgenid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sctstbparticipid != null ? sctstbparticipid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sctstbparticip)) {
            return false;
        }
        Sctstbparticip other = (Sctstbparticip) object;
        if ((this.sctstbparticipid == null && other.sctstbparticipid != null) || (this.sctstbparticipid != null && !this.sctstbparticipid.equals(other.sctstbparticipid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Sctstbparticip[ sctstbparticipid=" + sctstbparticipid + " ]";
    }
    
}
